flatMap

@ExperimentalSinceKotoolsTypes(version = "4.2")
inline fun <T, R> Result<T>.flatMap(transform: (T) -> Result<R>): Result<R>

Transforms the encapsulated value from T to R if this result is a success, or returns the original exception if this result or the one returned by the transform function is a failure.